package wkt.basic;

import cn.hutool.core.util.NumberUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.temporal.ChronoUnit;

@Data
@NoArgsConstructor
public class BasicExamDate {
    private Long id;
    private Long basicId;
    private String state = "NORMAL";
    private LocalDate date;

    public Long getRemainDays() {
        return NumberUtil.max(0, LocalDate.now().until(date, ChronoUnit.DAYS));
    }
}
